﻿
/**
作者：魏铁雷
时间：209-11-26
功能：实现权限
**/
var Obj = new Object();
var flag="";
function ShowMain() {
    GetLeft();
}
//获取"信息"
function GetLeft() {
    var url = encodeURI(SBasePath + '/action/Left/GetLeft.aspx');
    var pars = "?id=";
    var myAjax = new Ajax.Request(url, { method: 'get', parameters: pars, onComplete: sGetLeft, onFailure: fGetLeft });
}
//获取信息成功
function sGetLeft(o) {
   
    var root = o.responseXML.documentElement;
    flag = GetXmlData(root, "Value");
    ShowContent();
}

//获取信息成功失败
function fGetLeft(o) {

}

function ShowContent() {

    var str = "";
    str += '<table width="180" height="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;">';
    str += '<tr>';
    str += '  <td style="width:3px; background-image:url(images/main_40.gif)">&nbsp;</td>';
    str += '<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
    str += '<tr>';
    str += '<td height="26" background="images/main_21.gif">&nbsp;</td>';
    str += '</tr>';
    str += '<tr>';
    str += '<td height="80" style="background:url(images/main_23.gif); background-repeat:repeat-x;"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">';
    str += '  <tr>';
    if (flag == "1") {
        str += '   <td height="45" align="center"><a href="action/menutree.aspx" target="tree"><div  class="main26" onMouseOver="this.className=\'main26_1\'"  onmouseout="this.className=\'main26\'"></div></a></td>';
    } else {
    str += '   <td height="45" align="center"><div  class="main26" onMouseOver="this.className=\'main26_1\'"  onmouseout="this.className=\'main26\'"></div></td>';
}
str += '    <td align="center"><a  href="action/xxgltree.aspx" target="tree"><div  class="main28" onmouseover= "this.className=\'main28_1\'" onMouseOut="this.className=\'main28\'"></div></a></td>';
str += '  <td align="center"><div class="main31" onmouseover= "this.className=\'main31_1\'" onMouseOut="this.className=\'main31\'"></div></td>';
    str += '  </tr>';
    str += '  <tr>';
    if (flag == "1") {
        str += '  <td height="25"><div align="center" class="f_green"><a href="action/menutree.aspx" target="tree">系统管理</a></div></td>';

    } else {
        str += '  <td height="25"><div align="center" class="f_green">系统管理</div></td>';
    }
    str += ' <td height="25"><div align="center" class="f_green"><a href="action/xxgltree.aspx" target="tree">信息管理</a></div></td>';
    str += ' <td height="25"><div align="center" class="f_green"><a href="#">数据管理</a></div></td>';
    str += '</tr>';
    str += '</table></td>';
    str += '</tr>';
    str += '<tr>';
    str += '<td style="line-height:4px; background:url(images/main_38.gif)">&nbsp;</td>';
    str += '</tr>';
    str += '<tr>';
    str += '  <td><div align="center"><iframe name="tree" id="tree" height="411px" width="179" src="action/xxgltree.aspx"  border="0" frameborder="0"  scrolling="auto"></iframe> </div></td>';
    str += '</tr>';
    str += ' <tr>';
    str += '    <td valign="top">&nbsp;</td>';
    str += '  </tr>';
    str += '  </table></td>';
    str += ' </tr>';
    str += '</table>';
    $("Left").innerHTML = str;
}